﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Data;
using SoftSource.MVVMC;
using SoftSource.Timecard.Web.Data;

namespace SoftSource.Timecard.ViewModelInterfaces
{
    public interface IUserProjectEditorViewModelConsume : IDataViewModelConsume
    {
        #region Properties

        PagedCollectionView SourceProjects { get; }
        PagedCollectionView UserProjects { get; }

        #endregion Properties

        #region Methods

        Action<object> AddToUser { get; }
        Action<object> RemoveFromUser { get; }
        
        Func<ProjectSummary, Action, UIElement> CreateProjectMemberEditor { get; }
        Action Completed { get; }

        #endregion Methods
    }
    public interface IUserProjectEditorViewModelService : IDataViewModelService
    {
        #region Properties

        IEnumerable<ProjectMember> ProjectMembers { get; set; }
        IEnumerable<ProjectSummary> ProjectSource { get; set; }

        #endregion Properties

        #region Methods

        Action<ProjectSummary> AddToUserService { get; set; }
        Action<ProjectMember> RemoveFromUserService { get; set; }
        Func<ProjectSummary, Action, UIElement> CreateProjectMemberEditor { get; set; }
        Action Completed { get; set; }
        IObservable<Unit> SourceUpdated { get; set; }

        #endregion Methods
    }
    public interface IUserProjectEditorViewModel :
        IDataViewModel, 
        IUserProjectEditorViewModelConsume, 
        IUserProjectEditorViewModelService
    {
    }
}
